package com.example.ControllerAdvice.controller;

import com.example.ControllerAdvice.exception.MyException;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {

    @RequestMapping(value="/home", method = RequestMethod.GET)
    public Object home() throws Exception {
        throw new MyException(12," hello world");
    }

}
